package com.job.client.company.controller;


import com.job.client.common.result.ResponseResult;
import com.job.client.company.service.CategoryService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * <p>
 * 职位分类表 前端控制器
 * </p>
 *
 * @author fkl
 * @since 2023-12-07
 */
@RestController
@RequestMapping("/api/v1/client/company/category")
@Api(tags = "公司行业分类接口文档")
public class CategoryController {
    @Autowired
    private CategoryService categoryService;
    @PostMapping("/getCategoryName")
    @ApiOperation("通过category的id获得name")
    private ResponseResult getCategoryName(@RequestBody String categoryId){
        return categoryService.getCategoryName(categoryId);
    }

    @GetMapping("/get/all")
    @ApiOperation("获得所有的分类")
    public ResponseResult getCategoryList(){
        return categoryService.getCategoryList();
    }
}
